package com.ruoyi.market.enums;

import cn.hutool.core.util.StrUtil;
import lombok.Getter;

@Getter
public enum RolePageEnum {

    SPECIAL_MANAGER("103", "机构管理", "main_special"),
    SPECIAL_USER("102", "机构业务员", "main_special"),
    PROD_QIV("117", "企微产品", "main_prodqiv"),
            ;

    String value;
    String name;
    String page;

    RolePageEnum(String value, String name, String page){
        this.value = value;
        this.name = name;
        this.page = page;
    }

    public static String getPageByValue(String roleId){
        for (RolePageEnum item : values()) {
            if (StrUtil.equals(item.getValue(), roleId)){
                return item.getPage();
            }
        }
        return "";
    }
}
